I. Field of the Invention
The present invention relates to the principals of image processing and, more specifically, to the detection and correction of pixels within a digital image having color values that may not have actually been in the original scene when the photo was taken. Such pixels are common due to dust particles or imperfections in CDD or CMOS photo array elements. In particular, the proposed method involves using lenient thresholds based on unperceivable differences by the human visual system to perform a quick-test of each pixel with its immediately surrounding neighbors. The present invention also relates to a bad pixel detection module and to program instructions executable by a processor for bad pixel detection.
II. Background
A defective image pixel is defined as a pixel whose response is considerably different than the value of its neighbors. Dust particles or microlens defects are two common reasons why a given pixel could report erroneous values.
A common method for bad pixel detection is to mark a given pixel as defective if it's response is some percentage or fixed threshold greater than the maximum, or some percentage or fixed threshold less than the minimum of it's neighbor's values. This process requires numerous read accesses from system memory followed by numerous logical comparisons to compute the maximum and minimum of each neighboring pixels neighbors.
There is a need to perform bad pixel detection at considerably faster speeds than current known methods. The speed at which bad pixel detection is performed can be optimized over prior methods by exploiting weaknesses in the human visual system. In short, more lenient thresholds can be used for the red color compared to thresholds green colors, and even more lenient threshold for blue color compared to red and green colors.
Furthermore, the red, green and blue thresholds can be further relaxed depending on the candidate pixel's magnitude.